package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShoppingtableMapper;
import com.ruoyi.system.domain.Shoppingtable;
import com.ruoyi.system.service.IShoppingtableService;

/**
 * 顾客购物车Service业务层处理
 * 
 * @author 格格本奈
 * @date 2024-03-19
 */
@Service
public class ShoppingtableServiceImpl implements IShoppingtableService 
{
    @Autowired
    private ShoppingtableMapper shoppingtableMapper;

    /**
     * 查询顾客购物车
     * 
     * @param uid 顾客购物车主键
     * @return 顾客购物车
     */
    @Override
    public Shoppingtable selectShoppingtableByUid(Long uid)
    {
        return shoppingtableMapper.selectShoppingtableByUid(uid);
    }

    /**
     * 查询顾客购物车列表
     * 
     * @param shoppingtable 顾客购物车
     * @return 顾客购物车
     */
    @Override
    public List<Shoppingtable> selectShoppingtableList(Shoppingtable shoppingtable)
    {
        return shoppingtableMapper.selectShoppingtableList(shoppingtable);
    }

    /**
     * 新增顾客购物车
     * 
     * @param shoppingtable 顾客购物车
     * @return 结果
     */
    @Override
    public int insertShoppingtable(Shoppingtable shoppingtable)
    {
        return shoppingtableMapper.insertShoppingtable(shoppingtable);
    }

    /**
     * 修改顾客购物车
     * 
     * @param shoppingtable 顾客购物车
     * @return 结果
     */
    @Override
    public int updateShoppingtable(Shoppingtable shoppingtable)
    {
        return shoppingtableMapper.updateShoppingtable(shoppingtable);
    }

    /**
     * 批量删除顾客购物车
     * 
     * @param uids 需要删除的顾客购物车主键
     * @return 结果
     */
    @Override
    public int deleteShoppingtableByUids(Long[] uids)
    {
        return shoppingtableMapper.deleteShoppingtableByUids(uids);
    }

    /**
     * 删除顾客购物车信息
     * 
     * @param uid 顾客购物车主键
     * @return 结果
     */
    @Override
    public int deleteShoppingtableByUid(Long uid)
    {
        return shoppingtableMapper.deleteShoppingtableByUid(uid);
    }
}
